<template>
  <div class="contain">
    <hr />
    <div class="drive">
      <div class="title">驾校推荐</div>
    </div>
    <div class="main">
      <div
        class="content"
        v-for="(item, index) in driverSchoolList"
        :key="index"
      >
        <div class="top">
          <div class="top-left">
            <div style="display: flex">
              <p class="name">{{ item.driverSchoolName }}</p>
              <div class="star-w-s">
                <div class="bfb" :style="{width:item.width + '%'}"></div>
              </div>
            </div>
            <p>
              <span class="icon">口碑规</span>
              <span class="icon">口碑规</span>
              <span class="icon">口碑规</span>
              <span class="icon">口碑规</span>
            </p>
          </div>
          <div>
            <span class="price-red">￥{{ item.price }}</span>
            <button class="btn-stu-driver">立刻学车</button>
          </div>
        </div>
        <div class="assess">
          <img
            :src="item.img"
            alt=""
            style="float: left; width: 40px; height: 40px"
          />
          <p class="content-assess">{{ item.assess }}</p>
        </div>
      </div>
    </div>
    <div class="btn-bar"><a target="_blank" href="https://www.jiakaobaodian.com/school/">查看更多</a></div>
  </div>
  
</template>

<script>
export default {
  name: "DriverSchool",
  data() {
    return {
      driverSchoolList: [
        {
          driverSchoolName: "龙泉驾校",
          price: 3480,
          img: "https://avatar-user.mucang.cn/user-avatar/default/14.png!100x100",
          assess: "有个别教练态度非常不好！",
          width:84
        },
        {
          driverSchoolName: "嘉安驾校",
          price: 3480,
          img: "https://avatar-user.mucang.cn/user-avatar/default/9cUoh80wFWQ.jpg!100x100",
          assess: "教练很有耐心 都是一把过",
          width:65
        },
        {
          driverSchoolName: "公交驾校",
          price: 3480,
          img: "https://avatar-user.mucang.cn/user-avatar/default/RxaN6Bbches.jpg!100x100",
          assess: "王龙教练教的非常好，为人亲和，记住教练讲的那些点位，勤加练习，稳过。",
          width:99
        },
        {
          driverSchoolName: "金菱驾校",
          price: 4000,
          img: "https://avatar-user.mucang.cn/user-avatar/default/adK3Vu70DEQ.jpg!100x100",
          assess: "。。。。。。",
          width:23
        },
      ],
    };
  },
};
</script>

<style scoped>
.btn-bar {
    margin-top: 40px;
    font-size: 14px;
    color: #333;
    line-height: 1.01;
}
.btn-bar a {
    display: block;
    width: 280px;
    margin: 20px auto 0;
    line-height: 48px;
    border: 1px solid #e9e9e9;
    border-radius: 4px;
    color: #999;
    text-align: center;
    font-size: 16px;
}
.btn-bar a:hover{
  color: #007aff;
  border-color:  #007aff;
}
.bfb {
  height: 100%;
  background: url('https://www.jiakaobaodian.com/core-assets/jiakao/application/home/files/26170a2c1308047cbc25d47cc860cd1e.png') left center no-repeat;
}
.star-w-s {
  width: 90px;
  height: 20px;
  margin: 5px 0 0 10px;
  background: url("https://www.jiakaobaodian.com/core-assets/jiakao/application/home/files/109f4167a600727d6976ae03c64a5560.png")
    left center no-repeat;
}
.main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
.contain {
  padding: 80px 10%;
  width: 100%;
  height: 665px;
}
.title {
  width: 210px;
  display: inline-block;
  line-height: 41px;
  /* margin: 0 auto; */
  text-align: center;
  font-size: 30px;
  color: #333;
  background-color: #fff;
}
.drive {
  display: flex;
  justify-content: center;
}
hr {
  margin-bottom: -20px;
  height: 1px;
  border-top: 1px dotted #e9e9e9;
}
.content {
  height: 250px;
  width: 580px;
  padding: 40px 30px;
  border: 1px solid #eee;
}
.content .top {
  display: flex;
}
.top-left {
  width: 305px;
  height: 62px;
  border-right: 1px solid #ddd;
}
.top-left .name {
  max-width: 180px;
  display: inline-block;
  vertical-align: middle;
  font-size: 22px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #666;
}
.icon {
  display: inline-block;
  background: url("https://www.jiakaobaodian.com/core-assets/jiakao/application/home/files/24bc3d8a827f32b86d0ed191681125f9.png")
    left center no-repeat;
  padding-left: 20px;
  line-height: 20px;
  color: #666;
  font-size: 14px;
  margin-right: 5px;
}
.price-red {
  color: #ee4653;
  line-height: 63px;
  border-left: 1px solid #e9e9e9;
  font-size: 30px;
  text-align: center;
  width: 129px;
  height: 63px;
  display: inline-block;
}
.btn-stu-driver {
  width: 80px;
  line-height: 28px;
  margin-top: 17px;
  text-align: center;
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid #e9e9e9;
  background: 0 0;
}
.assess {
  margin-top: 30px;
  width: 520px;
  height: 80px;
  padding: 20px;
  background: #fafafa;
}
.content-assess {
  height: 40px;
  line-height: 20px;
  margin-left: 60px;
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  color: #999;
  font-size: 14px;
}
</style>